﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace TextLineUpdate
{
    public class FileIO
    {
        public string ReadText(string fileName)
        {
            string line = "";
            StringBuilder str = new StringBuilder();
            if (File.Exists(fileName))
            {
                StreamReader sr = new StreamReader(fileName, Encoding.Default);
                while ((line = sr.ReadLine()) != null) //テキストファイルを一行づつ読み込む
                {
                    str.AppendLine(line);
                }
                sr.Close();
            }
            return str.ToString();
        }
    }
}
